<!DOCTYPE html>
<html lang="en">

<include file="CommonSidebar:common-head"/>
<link rel="stylesheet" href="__ROOT__/Application/Admin/Public/css/common.css">
<link href="__ROOT__/Application/Admin/Public/css/jquery.datetimepicker.css" rel="stylesheet">
<body>

<div id="wrapper">

    <!-- Navigation -->
    <include file="CommonSidebar:common-navbar"/>

    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">有赞药店内码维护</h1>
            </div>
        </div>
        <!--<div class="row">-->
            <!--<div class="col-md-12">-->
                <!--<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">-->
                    <!--<div class="panel panel-default">-->
                        <!--<div class="panel-heading" role="tab" id="headingOne">-->
                            <!--<h4 class="panel-title">-->
                                <!--<a role="button" data-toggle="collapse" data-parent="#accordion"-->
                                   <!--href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">-->
                                    <!--搜索栏-->
                                <!--</a>-->
                            <!--</h4>-->
                        <!--</div>-->
                        <!--<div id="collapseOne" class="panel-collapse collapse in" role="tabpanel"-->
                             <!--aria-labelledby="headingOne">-->
                            <!--<div class="panel-body">-->
                                <!--<form action="{:U('ShowAllYZGoods')}" class="form-horizontal" method="get">-->
                                    <!--<div class="form-group">-->
                                        <!--<label class="col-sm-2 control-label">ERP内码</label>-->

                                        <!--<div class="col-sm-4">-->
                                            <!--<input class="form-control" name="goods_no" value="{$goods_no}">-->
                                        <!--</div>-->
                                        <!--<label class="col-sm-2 control-label">商品标题</label>-->

                                        <!--<div class="col-sm-4">-->
                                            <!--<input class="form-control" name="title" value="{$title}">-->
                                        <!--</div>-->
                                    <!--</div>-->
                                    <!--<div class="form-group">-->
                                        <!--<div class="col-sm-10 col-sm-offset-2">-->
                                            <!--<button type="submit" class="btn  btn-primary">筛选</button>-->
                                        <!--</div>-->
                                    <!--</div>-->
                                <!--</form>-->
                            <!--</div>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->
        <!--</div>-->
        <div class="row">
            <div class="col-lg-12">


                <div class="row">
                    <div class="col-md-12">
                        <table id="my-orders" class="table table-responsive table-bordered" style="margin-top: 10px"
                               border="0">

                            <tr>
                                <th style="text-align:center">有赞药店ID</th>
                                <th style="text-align:center">ERP药店内码</th>
                                <th style="text-align:center">联系人姓名</th>
                                <th style="text-align:center">电话</th>
                                <th style="text-align:center">门店名</th>
                                <th style="text-align:center">门店详细地址</th>
                                <th style="text-align:center">操作</th>
                            </tr>

                            <tfoot>
                            <tr>
                                <td colspan="12">
                                    <div class="pagination">
                                        {$page}
                                    </div>
                                    <div class="clear"></div>
                                </td>
                            </tr>
                            </tfoot>

                            <tbody id="context">
                            </tbody>


                        </table>

                    </div>
                </div>


            </div>
        </div>

    </div>
</div>
<!-- /#wrapper -->


<include file="CommonSidebar:common-script"/>
<script src="__ROOT__/Application/Admin/Public/js/jquery.datetimepicker.js"></script>
<!-- DataTables JavaScript -->
<script src="__ROOT__/Application/Admin/Public/bower_components/datatables/media/js/jquery.dataTables.min.js"></script>
<script src="__ROOT__/Application/Admin/Public/bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js"></script>

<!-- Custom Theme JavaScript -->
<script src="__ROOT__/Application/Admin/Public/dist/js/sb-admin-2.js"></script>
<!-- Page-Level Demo Scripts - Tables - Use for reference -->


<script type="text/javascript" src="__ROOT__/Application/Admin/Public/LoadPading/LoadPading.js?v=3"></script>
<link rel="stylesheet" href="__ROOT__/Application/Admin/Public/LoadPading/LoadPading.css" type="text/css"
      media="screen"/>


<script>
    $(document).ready(function () {
        $('#dataTables-example').DataTable({
            responsive: true
        });
    });
</script>
<script type="text/javascript">
    <!--日期插件-->
    $('.datetimepicker_mask').datetimepicker({
        lang: 'ch',
        mask: '9999-19-39',
        format: 'Y-m-d',
        timepicker: false,    //关闭时间选项
        yearStart: 2000,     //设置最小年份
        yearEnd: 3050,        //设置最大年份
        todayButton: true,    //关闭选择今天按钮
        autoclose: true
    });


</script>

<script>
    var LoadObj = new LoadPading(20, 5, "{:U('ERPAPI/YD_pageLoad_self?xj='.$xj.'&time='.$time.'&goods_no='.$goods_no.'&title='.$title.'&state1='.$state1)}", 5, false);
    $(function () {
        LoadObj.initFun_Load();
        LoadPading.prototype.setDateScene = function (useSet) {
            console.log(useSet);
            $("#context").html("");
            for (var i in useSet) {
                var html = '';
                html += " <tr class='odd gradeX'> ";

                html += "<td >" + useSet[i]['SHOP_CODE'] + "</td> ";

                html += "<td>" + useSet[i]['ERP_CODE'] + "</td> " +
                        "<td>" + useSet[i]['USER_NAME'] + "</td> " +
                        "<td>" + useSet[i]['USER_PHONE'] + "</td> " +
                        "<td>" + useSet[i]['YD_NAME'] + "</td> " +
                        "<td>" + useSet[i]['YD_XXDZ'] + "</td> ";

                if (useSet[i]['ERP_CODE'] != null) {
                    html += "<td> <a target='_blank' href=\"{:U('#')}" +
                            "?YDNAME=" + useSet[i]['YD_NAME']
                            + "&CKDZ=" + useSet[i]['YD_XXDZ']
                            + "&CKYDNAME=" + useSet[i]['YD_NAME']
                            + "&SHOP_CODE=" + useSet[i]['SHOP_CODE']
                            + "\"> " +
                            "<button>修改</button> </a> </td>";
                }else{
                    html += "<td> <a target='_blank' href=\"{:U('/ERPAPI/GETYDCODEINDEXLIST')}" +
                            "?YDNAME=" + useSet[i]['YD_NAME']
                            + "&CKDZ=" + useSet[i]['YD_XXDZ']
                            + "&CKYDNAME=" + useSet[i]['YD_NAME']
                            + "&SHOP_CODE=" + useSet[i]['SHOP_CODE']
                            + "\"> " +
                            "<button>导入</button> </a> </td>";
                }


                html += "</tr>";
                $("#context").append(html);
            }

        };

    });
</script>

</body>

</html>
